* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 260px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-item a:hover,
.nav-item.active a {
    background: #34495e;
    color: white;
}

.nav-item .icon {
    margin-right: 12px;
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #34495e;
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: #c0392b;
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

.main-header {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.content-area {
    flex: 1;
    padding: 30px;
}

.page-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.page-content h1 {
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
}

/* 统计卡片样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.stat-icon {
    font-size: 32px;
    opacity: 0.9;
}

.stat-info h3 {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

/* 快速操作样式 */
.quick-actions {
    margin-top: 40px;
}

.quick-actions h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 20px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.action-btn .icon {
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .content-area {
        padding: 20px;
    }
}

/* 加载状态 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #666;
}

/* 隐藏内容 */
.hidden {
    display: none !important;
}

/* Dify聊天容器样式 */
.dify-chat-container {
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dify-chat-container iframe {
    display: block;
}

/* 配置提示样式 */
.config-notice {
    text-align: center;
    padding: 60px 40px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    margin-top: 20px;
}

.notice-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.config-notice h3 {
    color: #495057;
    margin-bottom: 16px;
    font-size: 20px;
}

.config-notice p {
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.6;
}

.config-example {
    background: #e9ecef;
    padding: 16px;
    border-radius: 8px;
    text-align: left;
    margin-top: 20px;
    font-family: monospace;
}

.config-example strong {
    color: #495057;
    display: block;
    margin-bottom: 8px;
}

.config-example code {
    background: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    color: #e83e8c;
    font-size: 14px;
}

/* 错误信息样式 */
.error-message {
    text-align: center;
    padding: 60px 40px;
    margin-top: 20px;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.error-message h3 {
    color: #dc3545;
    margin-bottom: 16px;
    font-size: 20px;
}

.error-message p {
    color: #6c757d;
    margin-bottom: 24px;
    line-height: 1.6;
}

.retry-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
} 